package io.renren.modules.app.service.impl;

import io.renren.common.dto.TeachHistory;
import io.renren.common.utils.Query;
import io.renren.modules.app.service.ApiSongService;
import io.renren.modules.app.service.ApiTeachService;
import io.renren.modules.sys.dao.HistoryDao;
import io.renren.modules.sys.dao.SongDao;
import io.renren.modules.sys.dao.SongsetDao;
import io.renren.modules.sys.dao.TeachDao;
import io.renren.modules.sys.entity.SongEntity;
import io.renren.modules.sys.entity.SongsetEntity;
import io.renren.modules.sys.entity.TeachEntity;
import io.renren.modules.sys.entity.VedioEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * @author wangyi
 * @mail 794651397@qq.com
 * @createdate 2018/3/16 14:45
 **/
@Service("ApiTeachService")
public class ApiTeachServiceImpl implements ApiTeachService{
    @Autowired
    private TeachDao teachDao;
    @Autowired
    private HistoryDao historyDao;

    @Override
    public List<TeachEntity> teachListByType(HashMap<String,Object> map) {
        return teachDao.teachListByType(map);
    }

    @Override
    public TeachEntity queryTeachById(Long id) {
        return teachDao.queryObject(id);
    }

    @Override
    public List<SongEntity> querySongListByTeach(Long id) {
        return teachDao.getSongByTeachId(id);
    }

    @Override
    public List<VedioEntity> queryVedioListByTeach(Long id) {
        return teachDao.getVedioByTeachId(id);
    }

    @Override
    public List<TeachHistory> getMyTeach(Long userId) {
        return historyDao.getMyTeach(userId);
    }
}
